﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" x:Class="WMSSoft.WinKStart.Settings_EditDataSourceExtension"
        x:Name="SettingsEditDataSourceExtension"
        Title="Edit Key - Value - Assignment" Height="137" Width="365" ShowInTaskbar="False" ResizeMode="NoResize" WindowStartupLocation="CenterOwner"  WindowStyle="ToolWindow">
    <Grid Margin="10">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="79"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="20"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="30"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Label Content="Key:" Grid.Column="0" Grid.Row="0" Margin="0,0,0,0" Padding="0,0,0,0"/>
        <TextBox Grid.Column="1" Grid.Row="0" Margin="0,0,0,0" Padding="0,0,0,0" Text="{Binding KeyValue}" TextWrapping="Wrap" IsReadOnly="{Binding CanChangeAssignmentKey}"/>
        <Label Content="Value:" Grid.Row="1" Margin="0,10,0,0" Padding="0,0,0,0"/>
        <Grid Grid.Column="1" Grid.Row="1" Margin="0,10,0,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <TextBox Grid.Column="0" Grid.Row="0" Margin="0,0,0,0" Padding="0,0,0,0" Visibility="{Binding TextValueVisible}" Text="{Binding TextboxValue}" TextWrapping="Wrap"/>
            <ComboBox HorizontalAlignment="Left" Margin="0" Padding="5,0,5,0" Grid.Column="0" Grid.Row="1" VerticalAlignment="Top" Width="99" ItemsSource="{Binding AvailableListValues}" SelectedValue="{Binding ActiveListValue}" Visibility="{Binding ListValueVisible}" DisplayMemberPath="Value" SelectedValuePath="Key"/>
            <CheckBox Content="" Grid.Column="0" HorizontalAlignment="Left" Margin="0,5,0,0" Grid.Row="2" IsChecked="{Binding BoolValue}" Visibility="{Binding BooleanValueVisible}" VerticalAlignment="Top"/>
            <xctk:DoubleUpDown HorizontalAlignment="Left" Margin="0,0,0,0" Grid.Row="3" VerticalAlignment="Top" Value="{Binding NumericDoubleValue}" Visibility="{Binding NumericDoubleValueVisible}"/>
            <xctk:IntegerUpDown HorizontalAlignment="Left" Margin="0,0,0,0" Grid.Row="4" VerticalAlignment="Top" Width="51" Value="{Binding NumericValue}" Visibility="{Binding NumericValueVisible}"/>
        </Grid>
        <Grid Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Margin="0">
            <Grid.RowDefinitions>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Button Content="{Binding Cmd_OkClick.ViewName}" Grid.Column="0" HorizontalAlignment="Right" Margin="0,10,10,0" Grid.Row="3" Width="100" Command="{Binding Cmd_OkClick.Command}" CommandParameter="{Binding ElementName=SettingsEditDataSourceExtension}"/>
            <Button Content="{Binding Cmd_CloseClick.ViewName}" Grid.Column="1" HorizontalAlignment="Left" Margin="10,10,0,0" Grid.Row="3" Width="100" Command="{Binding Cmd_CloseClick.Command}" CommandParameter="{Binding ElementName=SettingsEditDataSourceExtension}"/>
        </Grid>
    </Grid>
</Window>
